home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / T-Z / Windoids.cpt / Windoid 1.6.1 / card_11446.txt < prev    next >
Text File  |  1989-04-13  |  3KB  |  118 lines

  1. -- card: 11446 from stack: in.1
  2. -- bmap block id: 11584
  3. -- flags: 0000
  4. -- background id: 10029
  5. -- name: 
  6.  
  7.  
  8. -- part 14 (field)
  9. -- low flags: 01
  10. -- high flags: 0000
  11. -- rect: left=6 top=246 right=271 bottom=77
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 65535
  15. -- font id: 20
  16. -- text size: 12
  17. -- style flags: 8192
  18. -- line height: 12
  19. -- part name: 
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   send mouseUp to cd btn 1
  23. end mouseUp
  24.  
  25.  
  26.  
  27. -- part 15 (button)
  28. -- low flags: 00
  29. -- high flags: 2000
  30. -- rect: left=76 top=243 right=274 bottom=107
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 10639 / 10639
  33. -- text alignment: 1
  34. -- font id: 0
  35. -- text size: 12
  36. -- style flags: 0
  37. -- line height: 16
  38. -- part name: 
  39. ----- HyperTalk script -----
  40.  
  41. --Same as Ted Kaehler's script, except it's specific for this button
  42.  
  43. on mouseStillDown
  44.   --Edits the script of a button if you press and hold the
  45.   --mouse button inside the button, and quickly
  46.   --move in and out of the top edge of the button twice.
  47.   global editTicks, editState
  48.   if (the ticks)-editTicks > 120 then
  49.     put the ticks into editTicks
  50.     put 0 into editState
  51.   else
  52.     get the rect of me
  53.     if the mouseV < (item 2 of it) then
  54.       if editState = 0 then put 1 into editState
  55.       if editState = 2 then put 3 into editState
  56.     end if
  57.     if the mouseV > (item 2 of it) then
  58.       if editState = 1 then put 2 into editState
  59.       if editState = 3 then put 4 into editState
  60.     end if
  61.   end if
  62.   --put editState
  63.   if editState = 4 then edit script of the name of me
  64. end mouseStillDown
  65.  
  66.  
  67. -- part contents for background part 11
  68. ----- text -----
  69. ‚Ä¢ Use a gesture to get to a button's script, without having to choose the Button Tool.  The gesture consists of pressing and holding the mouse button down inside the button, and moving the cursor in and out of the top edge of the button 2 times!  (Rub the top edge of the button.)
  70.  
  71. Practice until you can do it.
  72.  
  73. (The trick here is to not interfere with anything else.  I don't use the idle task, it can slow things down.  The whole thing is in the mouseStillDown message.  If your button uses mouseStillDown, you might want to "pass mouseStillDown" at the end of your script.)
  74.  
  75. Put this into your Home stack script
  76.  
  77. on mouseStillDown
  78.   --Edits the script of a button if you press and hold the
  79.   --mouse button inside the button, and quickly
  80.   --move in and out of the top edge of the button twice.
  81.   if "button" is not in the name of the target then exit mouseStillDown
  82.   global editTicks, editState
  83.   if (the ticks)-editTicks > 120 then
  84.     put the ticks into editTicks
  85.     put 0 into editState
  86.   else
  87.     get the rect of the target
  88.     if the mouseV < (item 2 of it) then
  89.       if editState = 0 then put 1 into editState
  90.       if editState = 2 then put 3 into editState
  91.     end if
  92.     if the mouseV > (item 2 of it) then
  93.       if editState = 1 then put 2 into editState
  94.       if editState = 3 then put 4 into editState
  95.     end if
  96.   end if
  97.   --put editState
  98.   if editState = 4 then edit script of the name of the target
  99. end mouseStillDown
  100. Ô£ø
  101.  
  102. -- part contents for background part 17
  103. ----- text -----
  104. Gesture
  105.  
  106. -- part contents for background part 18
  107. ----- text -----
  108. ‚Ä¢ by
  109. Ted Kaehler
  110.  
  111. -- part contents for background part 19
  112. ----- text -----
  113. volume 1 ‚Ä¢  number  6  ‚Ä¢  card 5  ‚Ä¢
  114.  
  115. -- part contents for card part 14
  116. ----- text -----
  117. try  "rubbing"
  118. this button